
export const state = () => ({
  // 全局主题颜色值
  theme: '#17B3A3',
  // 页面右侧抽屉是否显示
  showSettings: false,
  // 页面菜单标签栏是否显示
  tagsView: true,
  // 是否固定头部
  fixedHeader: true,
  // 是否显示logo图标
  sidebarLogo: true,
  // 是否折叠左边菜单栏
  isCollapse: false,
})

export const mutations = {
  CHANGE_SETTING: (state, { key, value }) => {
    // eslint-disable-next-line no-prototype-builtins
    if (state.hasOwnProperty(key)) {
      state[key] = value
    }
  },
  setThemeColor(state, color) {
    state.theme = color
  }
}
export const actions = {
  changeSetting({ commit }, data) {
    commit('CHANGE_SETTING', data)
  },

}
